package org.nfIt.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.nfIt.entity.product.Brand;
import org.nfIt.service.BrandService;
import org.nfIt.vo.common.Result;
import org.nfIt.vo.common.ResultCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClossName:BrandController
 * Pakage:org.nfIt.controller
 * Description
 *
 * h5品牌
 *
 * @Author L
 * @Create 2024/9/22 19:03
 * @Version 2023.1.3
 */
@Tag(name = "品牌管理")
@RestController
@RequestMapping(value="/api/product/brand")
//@SuppressWarnings({"unchecked", "rawtypes"})
public class BrandController {

    @Autowired
    private BrandService brandService;

    /**
     * 查询所有品牌
     */
    @Operation(summary = "获取全部品牌")
    @GetMapping("findAll")
    public Result<List<Brand>> findBrandAll() {
        List<Brand> list = brandService.findBrandAll();
        return Result.build(list, ResultCodeEnum.SUCCESS);
    }

}
